package com.turing.data.model.domain.excel;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.turing.orm.model.domain.common.BaseDo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Description 导出字段映射表
 * @Author lcy
 * @Date 2021-08-09
 */
@ApiModel(value = "导出字段映射表")
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ExportField extends BaseDo<ExportField> {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "parentTaskSn", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "场景id")
    @TableField("template_id")
    private String templateId;

    @ApiModelProperty(value = "字段属性")
    @TableField("filed_map")
    private String filedMap;

    @ApiModelProperty(value = "字段名称")
    @TableField("field_name")
    private String fieldName;

    @ApiModelProperty(value = "宽度")
    @TableField("width")
    private Integer width;

    @ApiModelProperty(value = "分组默认只有一个，如果导出包含多个文本，通过分组筛选")
    @TableField("export_group")
    private Integer exportGroup;

    @ApiModelProperty(value = "其它参数，通过该字段配置")
    @TableField("arguments")
    private String arguments;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

